﻿using Autofac.Extras.DynamicProxy2;

namespace AopOfAutofacCastleDemo
{
    // This attribute will look for a TYPED
    // interceptor registration:
    [Intercept(typeof(CallLogger))]
    public class First
    {
        public virtual int GetValue()
        {
            // Do some calculation and return a value
            return 1;
        }

        public virtual void Method1()
        {
            throw new System.Exception("我有异常");
        }
    }
}